package design.pattern.Combination.impl;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * 表示文件基础类
 *
 * @author lihh
 */
@AllArgsConstructor
@NoArgsConstructor
public class File extends Entry {
  private String name;
  private int size;
  
  @Override
  public String getName() {
    return this.name;
  }
  
  @Override
  public int getSize() {
    return this.size;
  }
  
  @Override
  public Entry add(Entry entry) {
    return null;
  }
  
  @Override
  public void printList(String prefix) {
    System.out.println(prefix + "/" + this.getName() + "(" + this.getSize() + ")");
  }
}
